#pragma once
#define __debug__ 1

// Types define
using qword = unsigned long long;
using dword = unsigned int;
using word = unsigned short;
using byte = unsigned char;

struct Flags
{
    byte conditions;
    byte R4Count;
    byte R8Count;
    byte reserve_l;
    dword reserve_h;
};
struct File
{
    dword fNameBegin;
    byte fNameLen;
    byte reserve_l;
    word reserve_h;
};

// Flags define
#define RUNNING 0x01
#define ERROR 0x02
#define _8BIT 0x00
#define _16BIT 0x04
#define _32BIT 0x08
#define _64BIT 0x0c
#define ZERO 0x10
#define POSITIVE 0x20
#define NEGATIVE 0x40
#define CARRY 0x80

// Items define
enum REGS : byte
{
    Code,
    Flag,
    Stack,
    Base,
    SI,
    Data,
    FileIO,
    DI
};

void init();
void checkValue(qword value);